package com.lixingqu.mvpdemo.ui.news;

import com.lixingqu.mvpdemo.base.BasePresenter;
import com.lixingqu.mvpdemo.base.BaseView;
import com.lixingqu.mvpdemo.entity.HttpResultEntity;
import com.lixingqu.mvpdemo.entity.NewsEntity;

import java.util.List;

import rx.Observable;

/**
 * Created by lixingqu on 2016/12/2.
 */

public class NewsContract {
    public interface View extends BaseView<Presenter>{
        void refresh(List<NewsEntity> httpResultEntity);
        void loadMore(List<NewsEntity> httpResultEntity);
        void onRequestStart();
        void onRequestComplete();
        void onRequestError();
    }
    public interface Model{
        Observable<HttpResultEntity<List<NewsEntity>>> getNews();
        Observable<HttpResultEntity<List<NewsEntity>>> refresh();
        Observable<HttpResultEntity<List<NewsEntity>>> loadMore();
    }
    public interface Presenter extends BasePresenter{
        void onRefresh();
        void onLoadMore();
    }
}
